/**
 * @author Administrator
 */
$(function(){
	$("#chkall").change(function(){
		if ($(this).attr("checked") === "checked") {
			$("input[type='checkbox']").attr("checked", true);
		}
		else{
			$("input[type='checkbox']").attr("checked", false);
		}
	});
	  $('.pagination').jqPagination({
        link_string: '/pages/{page_number}',
        current_page: pageIndex, //设置当前页 默认为1
        max_page: pagesCount, //设置最大页 默认为1
        page_string: '当前第' + pageIndex + '页,共' + pagesCount + '页',
        paged: function(page){
            var href = window.location.href;
            href = href.indexOf("/pages") == -1 ? href : href.substring(0, href.indexOf("/pages"));
            window.location.href = href + "/pages/" + page;
        }
    });
});
